<?php
/**
 * Created by PhpStorm.
 * User: guo
 * Date: 2017/6/17
 * Time: 21:55
 */
namespace app\controller;
class indexController extends \core\eric
{
    public function index()
    {
        p('This is indexController');
        $model = new \core\lib\model();
        $sql = 'SELECT * from user';
        $ret = $model->query($sql);
        p($ret->fetchAll());
    }

    public function php()
    {
        p('PHP是世界上最好的语言');
    }

    public function view()
    {
        $data  = '你好';
        $title = '我是大牛';
        $this->assign('title',$title);
        $this->assign('data',$data);
        $this->display('index.html');
    }
}